package com.itheimai02;

import java.util.Random;
import java.util.TreeSet;

public class Wrok06 {
    public static void main(String[] args) {
        //创建Random随机数对象
        Random r = new Random();
        //创建TreeSet用于保存不重复的红球
        TreeSet<Integer> ts  = new TreeSet<>();
        while (ts.size()<6){
            int i = r.nextInt(33);
            ts.add(i);
        }
        int l = r.nextInt(16);

        for (Integer t : ts) {
            System.out.println(t);
        }
        System.out.println(l);
    }
}
